/*    */ package com.zimbra.cs.filter.jsieve;
/*    */ 
/*    */ import com.google.common.base.Strings;
/*    */ import com.google.common.collect.ImmutableSet;
/*    */ import com.zimbra.cs.filter.ZimbraMailAdapter;
/*    */ import com.zimbra.cs.mime.ParsedAddress;
/*    */ import com.zimbra.cs.mime.ParsedMessage;
/*    */ import java.util.Set;
/*    */ import org.apache.jsieve.Arguments;
/*    */ import org.apache.jsieve.SieveContext;
/*    */ import org.apache.jsieve.exception.SieveException;
/*    */ import org.apache.jsieve.mail.MailAdapter;
/*    */ import org.apache.jsieve.tests.AbstractTest;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public final class LinkedInTest
/*    */   extends AbstractTest
/*    */ {
/* 44 */   private static final Set<String> ADDRESSES = ImmutableSet.of("connections@linkedin.com", "member@linkedin.com", "hit-reply@linkedin.com");
/*    */   
/*    */   protected boolean executeBasic(MailAdapter mail, Arguments args, SieveContext ctx) throws SieveException
/*    */   {
/* 48 */     if (!(mail instanceof ZimbraMailAdapter)) {
/* 49 */       return false;
/*    */     }
/* 51 */     ZimbraMailAdapter adapter = (ZimbraMailAdapter)mail;
/*    */     
/* 53 */     ParsedAddress sender = adapter.getParsedMessage().getParsedSender();
/* 54 */     if ((!Strings.isNullOrEmpty(sender.emailPart)) && (ADDRESSES.contains(sender.emailPart.toLowerCase()))) {
/* 55 */       return true;
/*    */     }
/* 57 */     return false;
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/filter/jsieve/LinkedInTest.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */